﻿<%@ Page Language="C#" MasterPageFile="~/Site.master" CodeBehind="List9.aspx.cs" Inherits="sistemaAcademicoFinanceiroEscolasdisciplina.List" %>

<%@ Register Src="~/DynamicData/Content/GridViewPager.ascx" TagName="GridViewPager"
    TagPrefix="asp" %>
<%@ Register Src="~/DynamicData/Content/FilterUserControl.ascx" TagName="DynamicFilter"
    TagPrefix="asp" %>
<%@ Register Assembly="Catalyst.Web.DynamicData" Namespace="Catalyst.Web.DynamicData"
    TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">


<div class="tamanho">

    <asp:DynamicDataManager ID="DynamicDataManager1" runat="server" AutoLoadForeignKeys="true" />
    <h2>
        Lista de Disciplinas</h2>
    <asp:ScriptManagerProxy runat="server" ID="ScriptManagerProxy1" />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableClientScript="true"
                HeaderText="Lista de erros de validação" />
            <asp:DynamicValidator runat="server" ID="GridViewValidator" ControlToValidate="GridView1"
                Display="None" />
            <!--
            <asp:FilterRepeater ID="FilterRepeater" runat="server">
                <ItemTemplate>
                    
                    <asp:Label runat="server" Text='<%# Eval("DisplayName") %>' AssociatedControlID="DynamicFilter$DropDownList1" />
                    <asp:DynamicFilter runat="server" ID="DynamicFilter" OnSelectedIndexChanged="OnFilterSelectedIndexChanged" />
                   
                </ItemTemplate>
                <FooterTemplate><br /><br /></FooterTemplate>
            </asp:FilterRepeater>
            -->
            <asp:DynamicFilterForm ID="DynamicFilterForm1" runat="server" DataSourceID="GridDataSource">
                <FilterTemplate>
                    disciplina
                    <asp:DynamicFilterControl ID="DynamicFilterControl3" runat="server" DataField="descricaoDisciplina"
                        FilterMode="Contains" />
                    <asp:Button ID="LinkButton1" runat="server" CommandName="Search" Text="Procurar">
                    </asp:Button><br />
                </FilterTemplate>
            </asp:DynamicFilterForm>
            <asp:GridView ID="GridView1" runat="server" DataSourceID="GridDataSource" AllowPaging="True"
                AllowSorting="True" CssClass="gridview" AutoGenerateColumns="False">
                <Columns>
                    <asp:DynamicField DataField="descricaoDisciplina" HeaderText="Disciplina " />
                    <asp:DynamicField DataField="serie" HeaderText="Série " />
                    <asp:TemplateField HeaderText="Professores " />
                    <asp:TemplateField HeaderText="Ações">
                        <ItemTemplate>
                            <%--<asp:HyperLink ID="EditHyperLink" runat="server" title="Editar"
                                NavigateUrl='<%# table.GetActionPath(PageAction.Edit, GetDataItem()) %>'
                             ImageUrl="~/images/btEditar.gif"/>&nbsp;                            
                            
                            <asp:HyperLink ID="DetailsHyperLink" runat="server" title="Visualizar todas informações"
                                NavigateUrl='<%# table.GetActionPath(PageAction.Details, GetDataItem()) %>'
                                ImageUrl="~/images/btVer.gif" />--%>
                            <%--<a href="#" onclick="javascript:window.open('<%=ConfigurationManager.AppSettings["url"] %>/realizarMatricula.aspx?codigoAluno=<%#Eval("codigoAluno") %>','Aluno','location=0,resizable=0,status=0,scrollbars=0,width=610,height=510');"> <img src=<%=ConfigurationManager.AppSettings["url"]%>/images/btRealizarMatricula.gif title="Realizar Matrícula do Aluno" border="0"></a>--%>
                            <a href="#" onclick="javascript:window.open('<%=ConfigurationManager.AppSettings["url"] %>/disciplinas/professoresDisciplina.aspx?codigoDisciplina=<%#Eval("codigoDisciplina") %>&descricaoDisciplina=<%#Eval("descricaoDisciplina") %>&codigoSerie=<%#Eval("codigoSerie") %>','ProfDisciplinas','location=0,resizable=0,status=0,scrollbars=0,width=450,height=320');">
                                <img src="<%=ConfigurationManager.AppSettings["url"] %>/images/btProfessoresDisciplina.gif" title="Definir professores da disciplina"
                                    border="0"></a>
                            <%--<asp:LinkButton ID="DeleteLinkButton" runat="server" CommandName="Delete"
                                CausesValidation="false" Text="Excluir" title="Excluir"
                                OnClientClick='return confirm("Tem certeza que deseja excluir o aluno?");'
                            />&nbsp;   --%>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <PagerStyle CssClass="footer" />
                <PagerTemplate>
                    <asp:GridViewPager ID="GridViewPager1" runat="server" />
                </PagerTemplate>
                <EmptyDataTemplate>
                    Não existem disciplinas cadastrados no sistema.
                </EmptyDataTemplate>
            </asp:GridView>
            <asp:DynamicLinqDataSource ID="GridDataSource" runat="server" ContextTypeName="sistemaAcademicoFinanceiroEscolas.modeloDataContext"
                TableName="disciplinas" EnableDelete="True">
            </asp:DynamicLinqDataSource>
            <br />
            <div class="bottomhyperlink">
                <%--<asp:HyperLink ID="InsertHyperLink" runat="server"><img runat="server" src="~/DynamicData/Content/Images/plus.gif" alt="Cadastrar novo aluno" />&nbsp;Cadastrar novo aluno</asp:HyperLink>--%>
                <%--<a href="Insert.aspx?informacao=nao"><img id="Img1" runat="server" src="~/DynamicData/Content/Images/plus.gif" alt="Cadastrar novo aluno" />&nbsp;Cadastrar novo aluno</a>--%>
            </div>
            <br>
            <a href="<%=ConfigurationManager.AppSettings["url"]%>/DefaultMenu.aspx">Voltar</a>
        </ContentTemplate>
    </asp:UpdatePanel>
    
    </div>
    
</asp:Content>
